﻿using System;

namespace CC.Yacht.Server
{
    public class Session
    {
        #region Constructor
        public Session(Guid id, ExtendedUser user, DateTime expires)
        {
            Expires = expires;
            Id = id;
            User = user;
        }
        #endregion

        #region Public Properties
        public DateTime Expires { get; set; }

        public Guid Id { get; private set; }

        public bool IsExpired
        {
            get { return Expires <= DateTime.Now; }
        }

        public ExtendedUser User { get; private set; }
        #endregion
    }
}
